fix output data type of image classification#31444
fix output data type of image classification#31444amyeroberts merged 9 commits intohuggingface:mainfrom
Conversation
|
Also, for the failed CI, it seems like not all tensors can be converted to |
amyeroberts
left a comment
There was a problem hiding this comment.
Thanks for working on a fix for this!
We'll need to protect the float cast and add tests to check the pipeline works when torch_dtype is set to float16 or bfloat16
|
Hi @amyeroberts . Thanks for your review. I have fixed your comments and added a test for the low-precision pipeline, but the CI seems to be going wrong. Can you help check the test? Thx! And other task pipelines also have this issue. I would like to hear your opinion and then change the rest of pipelines :) |
|
Hi @amyeroberts. Can you take a look at the new changes? If it is okay for you, I will update all other pipelines to support low precision. |
|
Hi @amyeroberts . Could you please take a review? The failed CIs are not related to my changes :) I am waiting for your comments to change the rest of the pipelines to support it. Thx! |
|
Hi @amyeroberts . I have rebased and passed all CIs. Would you please review them? |
amyeroberts
left a comment
There was a problem hiding this comment.
Thanks for adding!
Just a small request to add a test for bfloat16 too
|
Hi @amyeroberts . I have added |
amyeroberts
left a comment
There was a problem hiding this comment.
Thanks for fixing!
Just some small nits and we're ready to merge!
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
|
HI @amyeroberts . I have fixed the import issue, please take a review, thx! |
Hi @Narsil . I found an issue when running the low-precision pipeline of image-classification:
Error log:
We need to convert the output tensor to
float32so it can be converted tonumpy.